package com.pine.dcts.common;

import org.apache.commons.lang.StringUtils;

import java.io.File;

public class DctsConstant {

    public static final String PLUGINS = "plugins";
    public static final String READER = "reader";
    public static final String WRITER = "writer";

    // 是，成功，启用
    public static final Integer YES = 1;
    //否，失败，禁止
    public static final Integer NO = 0;

    public static final Integer UNINSTALL = -1;

    public static final String DATAX_CORE_CONTAINER_JOB_ID = "job.id";

    public static final String DATAX_CORE_CONTAINER_MODEL = "job.model";

    public static final String CONFIG_DATAX = "";

    public static final String CONFIG_SCHEDUL = "schedul";


    public static final String CONFIG_SCHEDUL_EXETYPE = "exeType";

    public static final String TASK_LOG_PATH = StringUtils.join(new String[]{
            "%s", "job", "%s.log.%s.log"}, File.separator);

    public static final String INIT_PASSWORD = "123456";

    public static final String VALIDATE_TASK_ = "VALIDATE_TASK_";


    /**
     * 验证码缓存名称
     */
    public static String VERIFICATION_CODE_CACHE_NAME = "VERIFICATION_CODE_CACHE:";


    /**
     * 系统运行模式
     */
    public interface SYSTEM_MODE {
        /**
         * 开发模式
         */
        String DEVELOP = "dev";
        /**
         * 测试模式
         */
        String TEST = "test";
        /**
         * 生产模式
         */
        String PRODUCT = "pro";

    }


    /**
     * 状态类型
     */
    public interface STATUS_TYPE {

        /**
         * 冻结/锁定
         */
        Integer LOCKED = 0;
        /**
         * 正常
         */
        Integer NORMAL = 1;
        /**
         * 停用
         */
        Integer DEACTIVATE = 2;

        /**
         * 待审核
         */
        Integer EXAMINE = 3;
        /**
         * 驳回
         */
        Integer DISMISSAL = 4;
        /**
         * 错误
         */
        Integer ERROR = 8;
        /**
         * 草稿
         */
        Integer DRAFT = 9;

    }
}
